<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class MY_Controller extends CI_Controller {

	public function __construct() {
		parent::__construct();

		// $this->output->enable_profiler(true);

		$uid = $this->session->userdata('uid');
		if (!$uid) {
			redirect('admin/login');
		}

		$this->load->model('auth_model', 'oauth');
		$nodes = $this->oauth->uid_nodes($uid);
		$rules = node_merge($nodes);
		$this->_data['nodes'] = $rules;
	}

}

/* End of file MY_Controller.php */
/* Location: ./application/core/MY_Controller.php */